<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        width: 300px;
        height: 300px;
        background-color: #b8bbb9;
        margin: 100px auto;
        transition: all 1s ease-in-out;
        transform-origin: top left;
        animation: rotate 3s linear 0s 1;
      }

      @keyframes rotate {
        0% {
          transform: rotate(0deg);
        }
        50% {
          transform: rotate(180deg);
        }
        100% {
          transform: rotate(0deg);
        }
      }
    </style>
  </head>
  <body>
    <div class="box"></div>
  </body>
</html>
